package com.tiancheng.trade.payment.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tiancheng.trade.payment.model.IntFlowDetail;
import com.tiancheng.trade.payment.vo.api.QueryFlowDetailVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 英文版支付流水明细持久化接口
 */
@Repository
public interface IntFlowDetailMapper extends TYBaseMapper<IntFlowDetail> {

    /**
     * 保存支付流水明细
     *
     * @param flowDetails
     * @return
     */
    int save(List<IntFlowDetail> flowDetails);

    /**
     * 查询流水明细
     *
     * @param queryFlowDetailVO
     * @param page
     * @return
     */
    IPage<Map> find(@Param("flowDetail") QueryFlowDetailVO queryFlowDetailVO, Page<?> page);


    /**
     * 流水明细批量更新-所更新字段值相同
     *
     * @param ids       id
     * @param colValMap 字段-值：(column, value)
     * @return
     */
    int updateSettleBatch(@Param("ids") List<Long> ids, @Param("colValMap") Map<String, Object> colValMap);

}
